From d1b1ba7ac66455c3de14b685d309620334d47b71 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Thu, 30 May 2019 17:50:10 +0200 Subject: [PATCH] babl: always intialize encoding pointer during format construction This fixes issue #35, we initialize with NULL which will cause babl_format_get_encoding to itself call babl_get_name rather. --- babl/babl-format.c | 1 + 1 file changed, 1 insertion(+) diff --git a/babl/babl-format.c b/babl/babl-format.c index 5784196..accc15a 100644 --- a/babl/babl-format.c +++ b/babl/babl-format.c @@ -127,6 +127,7 @@ format_new (const char *name, babl->format.palette = 0; babl->format.space = (void*)space; + babl->format.encoding = NULL; return babl; } -- 2.30.2